Ext.define('UDZ.view.Main', {  //定义类名与Main.js相同
    extend: 'Ext.tab.Panel', //继承tab.Panel
    xtype: 'main',
    requires: [ //只有Main能用
        'Ext.TitleBar',
        'Ext.Video'
    ],
    config: { //配置
        tabBarPosition: 'bottom',
        activeItem:2, //为了测试方便
        items: [
            {
                title: 'Welcome',
                iconCls: 'home',

                styleHtmlContent: true,
                scrollable: true,

                items: {
                    docked: 'top',
                    xtype: 'titlebar',
                    title: 'Welcome to Sencha Touch 2'
                },

                html: [
                    "You've just generated a new Sencha Touch 2 project. What you're looking at right now is the ",
                    "contents of <a target='_blank' href=\"app/view/Main.js\">app/view/Main.js</a> - edit that file ",
                    "and refresh to change what's rendered here."
                ].join("")
            },
            {
                title: 'Get Started',
                iconCls: 'action',

                items: [
                    {
                        docked: 'top',
                        xtype: 'titlebar',
                        title: 'Getting Started'
                    },
                    {
                        xtype: 'video',
                        url: 'http://av.vimeo.com/64284/137/87347327.mp4?token=1330978144_f9b698fea38cd408d52a2393240c896c',
                        posterUrl: 'http://b.vimeocdn.com/ts/261/062/261062119_640.jpg' //加载时放一个图片
                    }
                ]
            },
            {
                title: 'personal',
                iconCls: 'user',

                items: [
                    {
                        docked: 'top',
                        xtype: 'titlebar',
                        title: '个人中心'
                    },
                    {
                        xtype: 'formpanel',  //表单提交不能跨域
                        id:'myform',
                        height:'100%',//有时候出不来就是因为没有高度，有时候和Fullscren冲突
                        scrollable: false,
                        items:[

                            {
                                xtype: 'textfield',
                                name: 'name',
                                label: 'Name',
                                placeHolder:'请输入用户名'
                            },
                            {
                                xtype:'fieldset',
                                title:'请登录',
                                instructions:'请填写用户名和密码',
                                defaults:{
                                    labelWidth:'30%'
                                },
                                items:[
                                    {
                                        xtype: 'emailfield',
                                        name: 'email',
                                        label: 'Email'
                                    },
                                    {
                                        xtype: 'passwordfield',
                                        name: 'password',
                                        label: 'Password'
                                    }
                                ]
                            },
                            {
                                id:'div_txt',
                                xtype:'panel',
                                height:'370px',
                                scrollable: true
                            }
                        ]
                    }
                ]
            }
        ]
    }
});
